package com.thitech.sif;

import com.thitech.sif.utils.DataMap;

/**
 * 服务接收及返回对象
 * @author shisheng.lian
 * @date 2014-08-06
 */
public final class SIFReturn {
	private String type;
	private String message;
	private String code;
	private String invokeTime; //服务执行时间
	private DataMap responseExtMap;

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public DataMap getResponseExtMap() {
		if (null == responseExtMap) {
			responseExtMap = new DataMap();
		}
		return responseExtMap;
	}

	public String getInvokeTime() {
		return invokeTime;
	}

	public void setInvokeTime(String invokeTime) {
		this.invokeTime = invokeTime;
	}

	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append("Type=").append(getType()).append(";");
		sb.append("Message=").append(getMessage()).append(";");
		sb.append("Code=").append(getCode()).append(";");
		sb.append("InvokeTime=").append(getInvokeTime()).append(";");
		sb.append("ResponseExtMap=").append(getResponseExtMap().toString());
		return sb.toString();
	}
}
